<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="/WEB-INF/jsp/com/include/declare.jspf" %>
<%@ include file="/WEB-INF/jsp/com/include/doctype.jspf" %>
<script type="text/javascript" src="/kr/common/js/pie/pie_ready.js"></script>
<link rel="stylesheet" type="text/css" href="/kr/common/css/print.css" media="print" />
<script type="text/javascript">
	// Run capabilities test
	enhance({
		loadScripts: [
			{src: '/kr/common/js/pie/excanvas.js', iecondition: 'all'},
			'/kr/common/js/pie/chart_jQuery.js',
			'/kr/common/js/pie/view.js'
		],
		loadStyles: [
			'/kr/common/css/pie/chart.css',
		]
	});
	
	
	function evntPrint(id) {
	    //$('#'+id).printArea({mode: 'popup', popupClose: false});

	    window.print();
	}

	
    $(document).ready(function(){
       // $('#GCC').html( "50000000" );
       // $('#GCH').html( "0" );
       // $('#GCR').html( "10000000" );       
    }
    )
    
    

    
    function callSendEmail(){

        var quotNo = document.getElementById("quotNo");
   
        $.post("<c:url value='/estimation/estimation_mail.do'/>",
                {
                    'quotno' : quotNo.value
                },
                function(data){
                    var result={};
                    var items = $(data).find("item");
                    items.each(function(index,element){
                       var name = $(this).find("name").text();
                       var value = $(this).find("value").text();
                       result[name] = value;
                    });

                    if(result["result"] =="OK"){
                        
                       alert("이메일이 발송되었습니다");
                        
                         return true;                     
                     }
                }
            );      
           
    }    
    
    
    
    
    
    
    
    
    
    
    
    
    
	
</script>
</head>
<body>
<%@ include file="/WEB-INF/jsp/com/include/layerpopup.jspf" %>
<div id="wrap" class="non-subnavigation">
    <%@ include file="/WEB-INF/jsp/com/include/navi_utill_sub.jspf" %>
    <%@ include file="/WEB-INF/jsp/com/include/navi_header.jspf" %>
    <hr />

    <%@ include file="/WEB-INF/jsp/com/include/sub_header_global03.jspf" %>
    <hr />


	<div id="container">
		<div id="subtitle-area"><div class="subtitle-area-inner">
			<%@ include file="/WEB-INF/jsp/com/include/location.jspf" %>
		</div></div>
		<div id="article">
			<ul class="mypage-navigation">
                <li><a href="<c:url value="/mpg/summeryList.do"/>"><img src="/kr/images/global_menu/navi_mypage01_over.gif" alt="나의 요약정보" /></a></li>
                <li><a href="<c:url value="/mpg/pwdCheckView.do"/>"><img src="/kr/images/global_menu/navi_mypage02_out.gif" alt="회원 정보" /></a></li>
                <li><a href="<c:url value="/mpg/QuotList.do"/>"><img src="/kr/images/global_menu/navi_mypage03_over.gif" alt="최근 견적" /></a></li>
                <li><a href="<c:url value="/mpg/ctlgListPaging.do"/>"><img src="/kr/images/global_menu/navi_mypage04_out.gif" alt="카탈로그 신청 이력" /></a></li>
                <li><a href="<c:url value="/mpg/tdaListPaging.do"/>"><img src="/kr/images/global_menu/navi_mypage05_out.gif" alt="시승 신청 이력" /></a></li>
                <li><a href="<c:url value="/mpg/mpgEvntInfoView.do"/>"><img src="/kr/images/global_menu/navi_mypage06_out.gif" alt="이벤트 참여 이력" /></a></li>
                <li><a href="<c:url value="/mpg/QAListPaging.do"/>"><img src="/kr/images/global_menu/navi_mypage07_out.gif" alt="Q&amp;A" /></a></li>
			</ul>
			<h4 class="subsection"><img src="/kr/images/title/h4_global_menu03_03.gif" alt="최근견적" /></h4>
            <div class="modify-contents-wrap">
            <form name="quotForm" id="quitForm" method="post">
            <input type="hidden" name="quotNo" id="quotNo" value="${result.quotNo }">
            <div id="printArea">
				<div class="estimation-com-wrap">
					<div class="total-thumb">
						<div class="car-name">
							<c:out value="${result.carName}"/>
							<em><c:out value="${result.gradeName }"/></em>
						</div>
						<div class="car-wrap">
							<img src="<c:out value='${result.imagePath }'></c:out>" alt="선택 차량 이미지" class="car-thumb" />
						</div>
						<div class="selected-stats-wrap">
							<div class="selected-stats">
								<img src="/kr/images/estimation/txt_estimation_complete01.gif" alt="고객님의 총 차량견적 금액" />
								<span class="price"><c:out value="${result.totalPayMent }"/><em>원</em></span>
							</div>
							<p class="benefit">차량 금액 중 <b class="point01"><c:out value="${result.baseDc}"/>원</b> 구입혜택과 <b class="point01"><c:out value="${result.makerDc }"/> 세이브 포인트</b>를 받으셨습니다.</p>
						</div>
						<h5><img src="/kr/images/title/h5_estimation_complete01.gif" alt="할부사항" /></h5>
						<div class="pie-graph-wrap">
							<table class="aa" style="display:none;">
								<thead>
									<tr>
										<td></td>
										<th scope="col"></th>
										<th scope="col"></th>
										<th scope="col"></th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<th scope="row">현금</th>
										<td id="GCC"><c:out value="${result.totPrePayMent }"/></td>
									</tr>
									<tr>
										<th scope="row">할부</th>
										<td id="GCH"><c:out value="${result.halbuWon1 }"/></td>
									</tr>
									<tr>
										<th scope="row">등록</th>
										<td id="GCR"><c:out value="${result.totCarRegFee }"/> + <c:out value="${result.getCost }"/></td>
									</tr>
								</tbody>
							</table>
							<img src="/kr/images/estimation/circle.png" alt="차트 이미지" class="circle" />
						</div>
						<div class="plan-status">
							<div class="cell">
								<img src="/kr/images/estimation/txt_estimation_complete02.gif" alt="월 납입금" />
								<p class="price"><c:out value="${result.monthlyPay }"/><em>원</em></p>
							</div>
							<div class="cell">
								<img src="/kr/images/estimation/txt_estimation_complete03.gif" alt="할부원금/기간" />
								<p class="result"><c:out value="${result.halbuWon1 }"/>원 / <c:out value="${result.payMonth}"/>개월</p>
							</div>
							<div class="cell">
								<img src="/kr/images/estimation/txt_estimation_complete04.gif" alt="할부이자/이율" />
								<p class="result"><c:out value="${result.inTerest }"/>원 / <c:out value="${result.intRt1 }"/>%</p>
							</div>
						</div>
						<div class="datatable-wrap">
							<table summary="할부유형, 할부원금/기간, 총할부이자/이율, 월납입금">
							<caption>할부사항 정리</caption>
							<colgroup>
								<col width="25%" />
								<col width="25%" />
								<col width="25%" />
								<col width="25%" />
							</colgroup>
							<thead>
							<tr>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete05.gif" alt="할부유형" /></th>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete06.gif" alt="할부원금/기간" /></th>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete07.gif" alt="할부이자총액/이율" /></th>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete08.gif" alt="월납입금" /></th>
							</tr>
							</thead>
							<tbody>
							<tr>
								<td><c:out value="${result.payMentName }"/></td>
								<td><c:out value="${result.halbuWon1 }"/>원<br />/<c:out value="${result.payMonth }"/>개월</td>
								<td><c:out value="${result.inTerest }"/>원<br />/<c:out value="${result.intRt1}"/>%</td>
								<td class="last"><b class="point01"><c:out value="${result.monthlyPay }"/>원</b></td>
							</tr>
							</tbody>
							</table>
						</div>
					</div>
					<div class="estimation-detail">
						<h5><img src="/kr/images/title/h5_estimation_complete02.gif" alt="견적 가격사항" /></h5>
						<div class="datatable-wrap">
							<table summary="항목, 내역, 가격">
							<caption>견적 가격사항 정리</caption>
							<colgroup>
								<col width="24%" />
								<col width="38%" />
								<col width="38%" />
							</colgroup>
							<thead>
							<tr>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete09.gif" alt="항목" /></th>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete10.gif" alt="내역" /></th>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete11.gif" alt="가격" /></th>
							</tr>
							</thead>
							<tbody>
							<tr>
								<td class="sort">차종</td>
								<td>${result.carName } /${result.gradeName } / ${result.trimName } / ${result.tmCodeName }</td>
								<td class="price last"><b>${result.carPrice }원</b></td>
							</tr>
							<tr>
								<td class="sort">색상</td>
								<td>${result.colorName }</td>
								<td class="price last"><b>${result.colorPrice }원</b></td>
							</tr>
							<tr>
								<td class="sort">내장</td>
								<td>${result.colorName2 }</td>
								<td class="price last"><b>${result.colorPRice2 }원</b></td>
							</tr>
							<tr>
								<td class="sort">옵션</td>
								<td>${result.optionName }</td>
								<td class="price last"><b>${result.optionPrice}원</b></td>
							</tr>
							<tr>
								<td class="sort">TUIX</td>
								<td>${result.partsName }</td>
								<td class="price last"><b>${result.partsPrice }원</b></td>
							</tr>
							<tr>
								<td class="sort">탁송료</td>
								<td>${result.regnNm }</td>
								<td class="price last"><b>${result.transPrice}원</b></td>
							</tr>
							<tr>
								<td rowspan="3" class="sort">할인금액</td>
								<td>이달의 구입조건</td>
								<td class="price last"><b>${result.baseDc }원</b></td>
							</tr>
							<tr>
								<td>세이브포인트</td>
								<td class="price last"><b>${result.makerDc }원</b></td>
							</tr>
							<tr>
								<td>카드포인트</td>
								<td class="price last"><b>${result.cardPoint }원</b></td>
							</tr>
							</tbody>
							</table>
						</div>
						<p class="tip">포인트 중 ${result.etcPrice }원은 포인트 차감으로 지불조건에서 자동 계산됩니다.</p>

						<h5 class="subsection"><img src="/kr/images/title/h5_estimation_complete03.gif" alt="납입총액" /></h5>
						<div class="datatable-wrap">
							<table summary="항목, 내역, 가격">
							<caption>견적 가격사항 정리</caption>
							<colgroup>
								<col width="25%" />
								<col width="25%" />
								<col width="25%" />
								<col width="25%" />
							</colgroup>
							<thead>
							<tr>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete12.gif" alt="구분" /></th>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete13.gif" alt="항목" /></th>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete14.gif" alt="가격" /></th>
								<th scope="col"><img src="/kr/images/estimation/txt_estimation_complete15.gif" alt="합계" /></th>
							</tr>
							</thead>
							<tbody>
							<tr>
								<td rowspan="5" class="sort">출고전<br />납입금액</td>
								<td class="sort02">계약금</td>
								<td class="price">${result.contractFee }원</td>
								<td rowspan="5" class="price last"><b>${result.totPrePayMent }원</b></td>
							</tr>
							<tr>
								<td class="sort02">인도금</td>
								<td class="price">${result.indoMoney }원</td>
							</tr>
							<tr>
								<td class="sort02">금융회사 수수료</td>
								<td class="price">${result.paymentFee }원</td>
							</tr>
							<tr>
								<td class="sort02">인지대</td>
								<td class="price">${result.injiDae }원</td>
							</tr>
							<tr>
								<td class="sort02">단기의무보험</td>
								<td class="price">${result.dankiBohom }원</td>
							</tr>
							<tr>
								<td rowspan="6" class="sort">차량등록<br />비용</td>
								<td class="sort02">등록대행수수료</td>
								<td class="price">${result.regcostRegi }원</td>
								<td rowspan="5" class="price last"><b>${result.totCarRegFee }원</b></td>
							</tr>
                            <tr>
                                <td class="sort02">등록세</td>
                                <td class="price">${result.regcostReg }원</td>
                            </tr>							<tr>
								<td class="sort02">공채매입금액</td>
								<td class="price">${result.gongcheMoney }원</td>
							</tr>
							<tr>
								<td class="sort02">공채할인금액</td>
								<td class="price">${result.bondDc }원</td>
							</tr>
							<tr>
								<td class="sort02">중지대(수입인지)</td>
								<td class="price">${result.stampFee }원</td>
							</tr>
							<tr>
								<td class="sort02">차량번호판</td>
								<td class="price">${result.regcostPlate }원</td>
							</tr>
                            <!-- 
							<tr>
								<td colspan="2" class="sort03">취득세</td>
								<td class="price">${result.getCost }원</td>
								<td class="price last"><b>${result.getCost }원</b></td>
							</tr>
                             -->
							</tbody>
							<tfoot>
							<tr>
								<td colspan="3">납입총액</td>
								<td class="price last"><b>${result.totPrePayMent2 }원</b></td>
							</tr>
							</tfoot>
							</table>
						</div>
						<p class="tip">채권할인시 발생되는 위탁수수료는 포함되지 않습니다.</p>
					</div>
				</div>
                </div>
				<div class="btnwrap">
					<a href="javascript:evntPrint('printArea')" id="printButton" ><img src="/kr/images/common/button/btn_print.gif" alt="인쇄" /></a>
					<a href="javascript:callSendEmail()"><img src="/kr/images/common/button/btn_send_mail.gif" alt="메일전송" /></a>
				</div>
				<div class="estimation-service-wrap">
					<div class="service-notice">
						<strong><img src="/kr/images/estimation/txt_estimation_complete16.gif" alt="알려드립니다!" /></strong>
						<p>본 견적 내용은 고객님의 차량 구입 의사결정에 도움을 드리고자 하는 것으로 법적인 효력은 없습니다. 계약을 원하실 경우 별도로 청약의사표시를 하셔야 하며,<br />
						실제 계약 내용은 청약하실 시점의 차량가격변동, 판매조건이나 캐피탈의 대출조건에 따라 본 견적 내용과 달라질 수 있습니다.현대자동차는 지점/대리점의 카마스터를<br />
						통해서만 판매하며, 전국 어느 곳에서나 같은 제품 같은 가격으로 바른 거래를 실천하고 있습니다.</p>
					</div>

				</div>
                </form>
			</div>
		</div>
	</div>
	<hr />
    <%@ include file="/WEB-INF/jsp/com/include/footer.jspf" %>